/******************************************************************************
	This file is a part of the Snapshot Bioinformatics Project

	Copyright (C) 2012-2013 Jarom Schow

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef APP_SETTINGS_H
#define APP_SETTINGS_H

#include <QtCore/QSettings>

#include "SqlServer.h"

class AppSettings {
public:
	
	static bool	loadDBSettings( Bio::SqlServer::ServerType &type, QString &host, int &port, QString &user,
								QString &pass, QString &dbName );
	static void	saveDBSettings( Bio::SqlServer::ServerType type, const QString &host, int port, const QString &user,
								const QString &pass, const QString &dbName );

	static bool	read( QIODevice &device, QSettings::SettingsMap &map );
	static bool	write( QIODevice &device, const QSettings::SettingsMap &map );
};

#endif // APP_SETTINGS_H